package cloud.xlh.digital_power_card.controller;

import cloud.xlh.digital_power_card.client.card.dto.OpenCardDTO;
import cloud.xlh.digital_power_card.client.card.service.CardClientService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/8/30 13:59
 * @ Description:
 */
@RestController
@RequestMapping("/card")
public class CardController {
    @Resource
    private CardClientService cardClientService;

    @RequestMapping("/openCard")
    public String openCard(@RequestBody OpenCardDTO openCardDTO ) {
        return cardClientService.openCard(openCardDTO);
    }

    @RequestMapping("/selectCard")
    public String selectCard(String cardId) {
        return cardClientService.selectCard(cardId);
    }
}
